package com.base.myproject.server.tools;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class OperationADUser {
	private File operationFile;
	public void createOperationFile(String operationADString) {
		operationFile = new File("C:/operationADUser.bat");
		FileWriter writer = null;
		try {
			operationFile.createNewFile();
			writer = new FileWriter(operationFile);
			writer.write(operationADString);
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				writer.flush();
				writer.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
	
	public void deleteOperationFile() {
		operationFile.delete();
	}
	
	public String getFilePath() {
		return operationFile.getPath();
	}
}
